package consigna1;

public class CheckCapicua {

	public static Boolean check(String string) {
		
		String stringReverse = "";
		
		/* 
		// Version 1.0
		for (int i = 0; i < string.length() ; i++) {
			stringReverse = string.charAt(i) + stringReverse ;
		}
		*/
		
		// Version 2.0
		stringReverse = new StringBuffer(string).reverse().toString();
		
		return stringReverse.equals(string);
	}

}
